package com.zjz.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping(value = "/e",method = {RequestMethod.POST})
public class EncodingController {

    @RequestMapping(value = "/t",method = {RequestMethod.POST})
//    @PostMapping("/t")
    public String test(@RequestParam("name") String name, Model model){

         //过滤器解决乱码
        System.out.println("name为："+name);
        model.addAttribute("msg",name);

        return "test";

    }
}
